package org.numanint.code;

import java.util.ArrayList;
import java.util.HashMap;


public class BoXmlGenerator extends Generator {
	
	public BoXmlGenerator(GeneratorProperties p){
		super(p);
	}
	
	public void generator(ReverseEngineer reveng) throws Exception{	
			HashMap<String,Object> data = new HashMap<String,Object>();
			ArrayList<String> boArray = new ArrayList<String>();
			for(int i=0;i<reveng.getTableClasss().length;i++){	
				String className = ConventUtils.t2c(reveng.getTableClasss()[i].getTableName());		
				boArray.add(className);
			} 
			HashMap<String,Object> boMap=new HashMap<String,Object>();
			boMap.put("boList",boArray);
			boMap.put("properties", getProperties());
			data.put(ConventUtils.lowerFirstChar(getProperties().getProjectName())+"-bo.xml", boMap);
			super.setData(data);
			super.generator();
		
	}	
}
